home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / inetray / common.h < prev    next >
C/C++ Source or Header  |  1993-08-15  |  2KB  |  86 lines

  1. /*======================================================================
  2.                     C O M M O N . H 
  3.                     doc: Mon Feb 24 16:37:23 1992
  4.                     dlm: Fri Jul 23 16:02:44 1993
  5.                     (c) 1992 ant@julia
  6.                     uE-Info: 84 6 T 0 0 72 2 2 8 ofnI
  7. ======================================================================*/
  8.  
  9. #ifndef ITIMER_REAL
  10. #include    <sys/time.h>
  11. #endif
  12.  
  13. #ifndef TRUE                /* standard stuff */
  14. #define    FALSE    0
  15. #define    TRUE    1
  16. #endif
  17.  
  18. #define    IN    0            /* stdin fd */
  19. #define    OUT    1            /* stdout fd */
  20. #define    ERR    2            /* stderr fd */
  21.  
  22. #define    FOREVER    while(TRUE)
  23. #define    EXPORT
  24.  
  25. #ifdef bool_t
  26. struct hInfo {                /* hostinfo */
  27.     struct hInfo     *next;
  28.     struct in_addr    addr;        /* hostaddr */
  29.     CLIENT    *clnt;            /* rpc client */
  30.     char     name[MAXHOSTNAMELEN];    /* hostname */
  31.     int    sock;            /* receive socket */
  32.     XDR    xdrs;            /* receive xdr stream */
  33.     int      done;            /* # of lines done in total */
  34.     int    fDone;            /* # of lines done this frame */
  35.     int    wid;            /* worker id */
  36.     int     pid;            /* worker pid */
  37.     char    rUser[32];        /* remote user name */
  38.     char    rwd[MAXPATHLEN];    /* remote working dir */
  39.     char    rVersion[8];        /* remote version */
  40.     char    broken;            /* set if xmit error */
  41.     tbPrm    request;        /* last request sent */
  42.     int    reTrys;            /* # of comm retrys */
  43. } ;
  44.  
  45. typedef struct hInfo hInfo;
  46. #endif
  47.  
  48. #ifdef CALLTOUT
  49. static struct timeval
  50.     now = {0,0},            /* immediate return */
  51.     callTOut = {CALLTOUT,0},    /* not so immediate return */
  52.     resend = {RESEND,0};        /* resend traceblock msg */
  53. #endif
  54.  
  55. #ifdef NOSYSLOG_QUIRK
  56. #    define    OPENLOG(prog)    noSyslogOpen(prog)
  57. #    define    SYSLOG        noSyslog
  58. #    define    CLOSELOG()
  59. #else
  60. #    ifdef LOG_DAEMON
  61. #        define    OPENLOG(prog)    openlog(prog,LOG_PID,LOG_DAEMON)
  62. #    else    
  63. #        define    OPENLOG(prog)    openlog(prog,LOG_PID)
  64. #    endif
  65. #    define    SYSLOG        syslog
  66. #    define    CLOSELOG    closelog
  67. #endif
  68.  
  69. #ifndef _P_tmpdir
  70. #    define _P_tmpdir    "/tmp/"
  71. #endif
  72.  
  73. #ifndef FD_ZERO                /* A/UX */
  74. #    define    FD_ZERO(ssp)        *(ssp) = 0
  75. #    define FD_SET(fd,ssp)          *(ssp) |= (1 << fd)
  76. #    define    FD_ISSET(fd,ssp)     (*(ssp) & (1 << fd))
  77. #    define    fd_set            int
  78. #endif
  79.  
  80. #ifndef CLSET_TIMEOUT            /* A/UX */
  81. #    define CLSET_TIMEOUT       1   
  82. #    define clnt_control(cl,rq,in) \
  83.          ((*(cl)->cl_ops->cl_control)(cl,rq,in))
  84. #endif
  85.  
  86.